import { list2Obj } from '@/utils/bizUtils';
const ACCEPT_STATUS = [
  { label: '是', value: '1' },
  { label: '否', value: '0' },
]
export const FORM_ITEMS = [
  {
    prop: 'productName',
    label: '商品名称',
    type: 'input'
  },
  {
    prop: 'specDetail',
    label: '规格',
    type: 'input'
  },
  {
    prop: 'brandName',
    label: '品牌',
    type: 'input'
  },
  {
    prop: 'acceptFlag',
    label: '是否采纳',
    type: 'select',
    options: ACCEPT_STATUS
  },
  {
    prop: 'opeName',
    label: '操作人名称',
    type: 'input'
  },
  {
    prop: 'createTime',
    label: '修改日期',
    type: 'datePicker',
    datePickerType: 'datetimerange',
    timeKeys: ['startTime', 'endTime']
  },
]
// 列表表头
export const TABLE_COLUMNS = [
  {
    title: '商品名称',
    key: 'productName',
  },
  {
    title: '规格',
    key: 'specDetail',
  },
  {
    title: '品牌',
    key: 'brandName',
  },
  {
    title: '搜索结果',
    key: 'searchResult',
  },
  {
    title: '是否采纳',
    key: 'acceptFlag',
    formatter: (row, columns, cellValue) => {
      return list2Obj(ACCEPT_STATUS)[cellValue]
    }
  },
  {
    title: '创建时间',
    key: 'createTime',
  },
  {
    title: '修改人ID',
    key: 'operId',
  },
  {
    title: '修改人名称',
    key: 'operName',
  },
]
